package com.ladlee.bean.config;


/**
 * @Auther: dingchang
 * @Date: 2018/12/15 10:33
 * @Description: api在线文档
 */
//@Configuration
//@EnableSwagger2
public class SwaggerConfig {

    /*@Bean
    public Docket createRestApi(){
        ParameterBuilder tokenBuilder = new ParameterBuilder();
        List<Parameter> parameterList = new ArrayList<>();
        tokenBuilder.name("Authorization")
                .defaultValue("去其他请求中获取heard中token参数")
                .description("令牌")
                .modelRef(new ModelRef("string"))
                .parameterType("header")
                .required(true)
                .build();
        parameterList.add(tokenBuilder.build());
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(apiInfo())
                .select()
                .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
                .paths(PathSelectors.any())
                .build();
                //.globalOperationParameters(parameterList);
    }*/

    /*private ApiInfo apiInfo(){
        return new ApiInfoBuilder()
                .title("Pig Swagger API ")
                .description("测试cloud")
                .termsOfServiceUrl("测试cloud")
                .contact(new Contact("","https://ladlee.com","123456@qq.com"))
                .version("1.0")
                .build();
    }*/
}
